package cn.guestbook.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * @author Wangzi
 * @email yhjhoo@gmail.com
 *
 */

public class User implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer userId;
	private String loginname;
	private String nickName;
	private String email;
	private String qq;
	private String password;
	private Date lastLogin;
	private Integer status = 1;
	private Set posts = new HashSet(0);

	// Constructors

	/** default constructor */
	public User() {
	}

	/** minimal constructor */
	public User(String loginname, String nickName, String email,
			String password, Date lastLogin, Integer status) {
		this.loginname = loginname;
		this.nickName = nickName;
		this.email = email;
		this.password = password;
		this.lastLogin = lastLogin;
		this.status = status;
	}

	/** full constructor */
	public User(String loginname, String nickName, String email, String qq,
			String password, Date lastLogin, Integer status, Set posts) {
		this.loginname = loginname;
		this.nickName = nickName;
		this.email = email;
		this.qq = qq;
		this.password = password;
		this.lastLogin = lastLogin;
		this.status = status;
		this.posts = posts;
	}

	// Property accessors

	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getLoginname() {
		return this.loginname;
	}

	public void setLoginname(String loginname) {
		this.loginname = loginname;
	}

	public String getNickName() {
		return this.nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getQq() {
		return this.qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Date getLastLogin() {
		return this.lastLogin;
	}

	public void setLastLogin(Date lastLogin) {
		this.lastLogin = lastLogin;
	}

	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Set getPosts() {
		return this.posts;
	}

	public void setPosts(Set posts) {
		this.posts = posts;
	}

}